package com.xbongbong.saas.domain.entity;

import com.xbongbong.paas.enums.DelEnum;
import com.xbongbong.paas.toolbox.util.DateTimeUtil;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * 资金账户流水
 *
 * @author 徐俊杰
 * @date 2020/3/17 10:49
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class FundAccountFlowEntity implements Serializable{

    private static final long serialVersionUID = -8215319997762959801L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 公司id
     */
    private String corpid;

    /**
     * 创建时间时间戳
     */
    private Long addTime;

    /**
     * 更新时间时间戳
     */
    private Long updateTime;

    /**
     * 删除标志
     */
    private Integer del;

    /**
     * 创建者id
     */
    private String creatorId;

    /**
     * 关联单据类型  1-回款单 2-付款单
     * @see com.xbongbong.paas.enums.FundAccountFlowTypeEnum
     */
    private Integer type;

    /**
     * 关联单据id
     */
    private Long sheetId;

    /**
     * 资金账户id
     */
    private Long accountId;

    /**
     * 表单时间
     */
    private Long sheetTime;

    /**
     * 表单时间
     */
    private Double sheetAmount;

    public FundAccountFlowEntity() {}

    public FundAccountFlowEntity(String corpid, Long updateTime, String creatorId, Integer type, Long sheetId, Long accountId, Long sheetTime, Double sheetAmount) {
        this.corpid = corpid;
        this.addTime = DateTimeUtil.getInt();
        this.updateTime = updateTime;
        this.creatorId = creatorId;
        this.type = type;
        this.sheetId = sheetId;
        this.accountId = accountId;
        this.sheetTime = sheetTime;
        this.sheetAmount = sheetAmount;
        this.del = DelEnum.NORMAL.getDel();
    }

    public FundAccountFlowEntity(String corpid, Long addTime, Long updateTime, String creatorId, Integer type, Long sheetId, Long accountId, Long sheetTime, Double sheetAmount) {
        this.corpid = corpid;
        this.addTime = addTime;
        this.updateTime = updateTime;
        this.creatorId = creatorId;
        this.type = type;
        this.sheetId = sheetId;
        this.accountId = accountId;
        this.sheetTime = sheetTime;
        this.sheetAmount = sheetAmount;
        this.del = DelEnum.NORMAL.getDel();
    }
}
